<!--
 * @Author: HeAo
 * @Date: 2021-12-27 08:58:14
 * @LastEditTime: 2021-12-27 09:05:38
 * @LastEditors: HeAo
 * @Description: 
 * @FilePath: \study\day02\2-伸缩盒.html
 * 别乱动！
-->
<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    body {
      margin: 0;
    }

    .container {
      display: flex;
      background-color: #999;
    }

    .box1 {
      width: 300px;
      height: 300px;
      background-color: paleturquoise;
    }

    .box2 {
      /* width: 300px; */
      flex: 0.5;
      height: 300px;
      background-color: orange;
    }
  </style>
</head>

<body>
  <div class="container">
    <div class="box1"></div>
    <div class="box2"></div>
  </div>
</body>

</html>